/*
* @Date: 2021/3/30
* @Author: XueChengwu <xuechengwu@erayt.com>
* @Copyright: 2015-2019 Erayt, Inc.
* @Description: If you have some questions, please contact: xuechengwu@erayt.com.
*/
import React from 'react';
import { Tree } from 'antd';
import Icon from '@/components/Icon';
import './index.scss';

export default class extends React.Component {
  render() {
    const { modals = [], pages = [], widgets = [], projectName = 'test' } = this.props;
   return (
     <div className="file-viewer-box">
       <Tree
         showLine
         blockNode
         switcherIcon={<Icon type="bofang_huaban1"/>}
         treeData={[{
           title: projectName,
           key: 'project',
           children: [{
             title: 'pages',
             key: 'pages',
             children: pages,
           }, {
             title: 'modals',
             key: 'modals',
             children: modals,
           }, {
             title: 'widgets',
             key: 'widgets',
             children: widgets,
           }]
         }]}
       />
     </div>

   );
  }
}
